package com.qf.service.impl;

import com.qf.dao.AdminDao;
import com.qf.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

/**
 * @Author Ayases
 * @Date 2025/4/2 19:12
 * @Desc
 */
@Service// 加上该注解,AdminServiceImpl类就会被spring容器创建对象
public class AdminServiceImpl implements AdminService {

    @Autowired// 注入Dao对象
    @Qualifier("adminDaoImpl")// 这里的@Qualifier注解是为了解决多个Dao对象的问题
    private AdminDao adminDao;

    @Override
    public void login() {
        System.out.println("这个地方业务层来执行登录逻辑");
        adminDao.login();
    }

}
